﻿

<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/framework/head.jsp"%>
<%@ page import="com.hitrust.gs.lib.GSAutoAuditongDateConfigurator"%>
<%@ page import="java.util.List"%>
<%@ page import="com.hitrust.gs.dao.GSProductTaxDao"%>
<!--********************* Part2:Java Code *********************-->
<%
	ProductSearchTempEvent event = (ProductSearchTempEvent) context
				.getSessionValue("ProductSearchEvent");
		String isPlanPrice = (String) context.getValue("isPlanprice");

		String isbuy = (String) request.getParameter("i_IsBuy");
		if (isbuy == null) {
			event.setIsBuy("1");
		}
		String status = (String) request.getParameter("i_Status");
		if (status == null) {
			event.setStatus("1");
		}
		String providerStatus = (String) request
				.getParameter("i_ProviderStatus");
		if (providerStatus == null) {
			event.setProviderStatus("1");
		}
		String isProductType = (String) request
				.getParameter("i_IsProductType");
		if (isProductType != null && isProductType.equals("1")) {
			event.setIsCountProductType("1");
		}
		
		ObjectList list = Product.fetch().search(con, event);
		ObjectList tManuf1 = ProductCategory.getCategoryLevel1(con);
		ObjectList tManuf2 = ProductCategory.getCategoryLevel2(con);
		ObjectList tManuf3 = ProductCategory.getCategoryLevel3(con);

		List list1 = ProductType.getProductTypeList(con);
		List list2 = ProductType.getProductBidList(con, "");
		List list3 = ProductType.getProviderList(con, "");
		User user=loginInfo.getUser();
		boolean isTel=user.getTel().equals("1");
		if(isTel){
			isPlanPrice="1";
		}
		context.setSessionValue("User",user);
%>

<%@ page import="com.hitrust.gs.service.*"%>
<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<%@page import="system.LoginContext"%>


<script language=javascript><!--
var list_code = "listProductUpdate";
function doSearch()
{
    SetValue("s_GrandfatherCategoryCode",GetValue("i_GrandfatherCategoryCode")); //产品分类编码
    SetValue("s_UpperCategoryCode",GetValue("i_UpperCategoryCode")); //产品分类编码
    SetValue("s_CategoryCode",GetValue("i_CategoryCode")); //产品分类编码  
    SetValue("s_ConcentricityCode",GetValue("i_ConcentricityCode")); //集中编码
    SetValue("s_Name",GetValue("i_Name")); //产品名称
    SetValue("s_Spec",GetValue("i_Spec")); //规格
    SetValue("s_Model",GetValue("i_Model")); //型号
    SetValue("s_ProductBrand",GetValue("i_ProductBrand")); //品牌
    SetValue("s_Manufaturer",GetValue("i_Manufaturer")); //生产厂家
    SetValue("s_ProviderCode",GetValue("i_ProviderCode")); //供应商
    SetValue("s_DrawingPieceCode",GetValue("i_DrawingPieceCode")); //图件号
  //  SetValue("s_KeyWord",GetValue("i_KeyWord"));//关键字
  //  SetValue("s_IsNormal",GetValue("i_IsNormal")); //是否正式产品
    //SetValue("s_IsTradeflatProduct",GetValue("i_IsTradeflatProduct")); //是否交易平台的产品
    //SetValue("s_Status", '<%=event.getStatus()==null?"1":""%>'); //是否有效
    SetValue("s_IsBuy",GetValue("i_IsBuy")); //是否可采购
    SetValue("s_IsPic",GetValue("i_IsPic")); //有无图片
  //  SetValue("s_WarehouseCode",GetValue("i_WarehouseCode")); //仓库编码
 //   SetValue("s_ProviderStatus",'<%=event.getProviderStatus()==null?"1":""%>'); //供应商

 	<%if(status!=null){%>
	 SetValue("i_Status",'<%=status%>'); 
	<%}%>
 	<%if(providerStatus!=null){%>
	 SetValue("i_ProviderStatus",'<%=providerStatus%>'); 
	<%}%>
    SetValue("s_OrderField",GetValue("i_OrderField")); //排序
    SetValue("s_OrderDesc",getCheckBoxValues("i_OrderDesc")); //升降序
    SetValue("s_UpperType",GetValue("i_UpperType"));
    SetValue("s_ProductType",GetValue("i_ProductType")); //产品供应商分类
    SetValue("s_ProductTypeProviderCode",GetValue("i_ProductTypeProviderCode")); //产品供应商分类
    SetValue("s_IsCountProductType",'<%=event.getIsCountProductType()==null?"":event.getIsCountProductType()%>');
    doCommonSearch();
}

function addInfos()
{
  window.open("<%= response.encodeURL(request.getContextPath() + "/A1900054.do?type="+"0")%>");
}

function bizViewProduct(id)
{
	viewWinMax("<%=Config.getSrv()%>?action_code=viewProduct&Id="+id);
}

function doUnite(){

}
function doToAdd()
{
    SetAction("toAddProduct");
    frm.submit();
}

function doToUpdate()
{
    if(!checkOne("ids")) 
    {
        bizMessage("修改","产品");
        return false;
    }
    SetValue("Id",getCheckBoxValue("ids"));
    SetAction("toUpdateProductTax");
    frm.submit();
}

function doToCopy()
{
    if(!checkOne("ids")) 
    {
        bizMessage("复制","产品");
        return false;
    }
    SetValue("Id",getCheckBoxValue("ids"));
    SetAction("toCopyProduct");
    frm.submit();
}
function selectOnChange1()
{
  var val = GetValue("i_GrandfatherCategoryCode");
  if(val==''){
    var listbox = document.getElementById("i_UpperCategoryCode");
    listbox.length = 0;
    var option = new Option();
    option.text = "---二级---";
    option.value = "";
    listbox.options[listbox.length] = option;
    //change2(optval);
  }else{
      var counter="0";
      <%if (tManuf1.size() > 0) {
					for (int i = 0; i < tManuf1.size(); i++) {
						ProductCategory pc1 = (ProductCategory) tManuf1.get(i);
						String tCode1 = pc1.getCode();%>
              if(val == '<%=tCode1%>')
              {
                counter="1";
                var listbox = document.getElementById("i_UpperCategoryCode");
                listbox.length = 0;
                var option1 = new Option();
                option1.text = "---二级---";
                option1.value = "";
                listbox.options[listbox.length] = option1;
                <%for (int n = 0; n < tManuf2.size(); n++) {
							ProductCategory pc2 = (ProductCategory) tManuf2
									.get(n);
							String tUpperCategory = pc2.getUpperCategory();
							if (tUpperCategory == null)
								tUpperCategory = "";
							if (tUpperCategory.equals(tCode1)) {
								String categoryId = pc2.getCode();
								String categoryName = pc2.getName();%>
                        var temp1 = '<%=categoryId%>';
                        var temp2 = '<%=categoryName%>';
                        var option1 = new Option();
                        option1.value = temp1;
                        option1.text = temp2;
                        listbox.options[listbox.length] = option1;                       
                        <%}
						}//end for%>
         
               }//end if
          <%}//end for
				}//end if%>
      
      if(counter == '0')
      {
          var listbox = document.getElementById("i_UpperCategoryCode");
          listbox.length = 0;
          var option = new Option();
          option.value = "";
          option.text = "---二级---";
          listbox.options[listbox.length] = option;  
       }

   }//end else

}


function selectOnChange2()
{
  var val = GetValue("i_UpperCategoryCode");
  if(val==''){
    var listbox = document.getElementById("i_CategoryCode");
    listbox.length = 0;
    var option = new Option();
    option.text = "---三级---";
    option.value = "";
    listbox.options[listbox.length] = option;
    //change2(optval);
  }else{
      var counter="0";
      <%if (tManuf1.size() > 0) {
					for (int i = 0; i < tManuf2.size(); i++) {
						ProductCategory pc2 = (ProductCategory) tManuf2.get(i);
						String tCode2 = pc2.getCode();%>
              if(val == '<%=tCode2%>')
              {
                counter="1";
                var listbox = document.getElementById("i_CategoryCode");
                listbox.length = 0;
                var option1 = new Option();
                option1.text = "---三级---";
                option1.value = "";
                listbox.options[listbox.length] = option1;
                <%for (int n = 0; n < tManuf3.size(); n++) {
							ProductCategory pc3 = (ProductCategory) tManuf3
									.get(n);
							String tUpperCategory = pc3.getUpperCategory();
							if (tUpperCategory == null)
								tUpperCategory = "";
							if (tUpperCategory.equals(tCode2)) {
								String categoryId = pc3.getCode();
								String categoryName = pc3.getName();%>
                        var temp1 = '<%=categoryId%>';
                        var temp2 = '<%=categoryName%>';
                        var option1 = new Option();
                        option1.value = temp1;
                        option1.text = temp2;
                        listbox.options[listbox.length] = option1;                       
                        <%}
						}//end for%>
         
               }//end if
          <%}//end for
				}//end if%>
      
      if(counter == '0')
      {
          var listbox = document.getElementById("i_CategoryCode");
          listbox.length = 0;
          var option = new Option();
          option.value = "";
          option.text = "---三级---";
          listbox.options[listbox.length] = option;  
       }

   }//end else

}


function doGet()
{
    frm.action="/gw/system/base/DownExcel.jsp";
    frm.submit();
}
function doExcel(){
    <%if (list.getTotalSize() > 31500) {%>
        alert("导出EXCEL产品数量不能超过31500条！");
        return false;
    <%} else {%>

        window.location.href="<%=Config.getWebPath()%>/GSproductDown";

    <%}%>
}

function addToMyProduct() {
    if(!hasChooseRadio("ids")) 
    {
        bizMessage("加入我的产品","产品");
        return false;
    }

    SetAction("addToMyProduct");
    frm.submit();
}



function selectChange1()
{
  var val = GetValue("i_UpperType");
  if(val==''){
    var listbox = document.getElementById("i_ProductType");
    listbox.length = 0;
    var option = new Option();
    option.text = "--分类--";
    option.value = "";
    listbox.options[listbox.length] = option;
    //change2(optval);
  }else{
      var counter="0";
      <%if (list1.size() > 0) {
					for (int i = 0; i < list1.size(); i++) {
						ProductType pc1 = (ProductType) list1.get(i);
						String tCode1 = pc1.getProductType() + "";%>
              if(val == '<%=tCode1%>')
              {
                counter="1";
                var listbox = document.getElementById("i_ProductType");
                listbox.length = 0;
                var option1 = new Option();
                option1.text = "--分类--";
                option1.value = "";
                listbox.options[listbox.length] = option1;
                <%for (int n = 0; n < list2.size(); n++) {
							ProductType pc2 = (ProductType) list2.get(n);
							String tUpperCategory = pc2.getProductType() + "";
							if (tUpperCategory == null)
								tUpperCategory = "";
							if (tUpperCategory.equals(tCode1)) {
								String categoryId = pc2.getIsBid() + "";
								String categoryName = pc2.getRemark();%>
                        var temp1 = '<%=categoryId%>';
                        var temp2 = '<%=categoryName%>';
                        var option1 = new Option();
                        option1.value = temp1;
                        option1.text = temp2;
                        listbox.options[listbox.length] = option1;                       
                        <%}
						}//end for%>
         
               }//end if
          <%}//end for
				}//end if%>
      
      if(counter == '0')
      {
          var listbox = document.getElementById("i_ProductType");
          listbox.length = 0;
          var option = new Option();
          option.value = "";
          option.text = "--分类--";
          listbox.options[listbox.length] = option;  
       }

   }//end else

}


function selectChange2()
{
  var val = GetValue("i_ProductType");
  var val2 = GetValue("i_UpperType");
  if(val==''){
    var listbox = document.getElementById("i_ProductTypeProviderCode");
    listbox.length = 0;
    var option = new Option();
    option.text = "--供应商--";
    option.value = "";
    listbox.options[listbox.length] = option;
    //change2(optval);
  }else{
      var counter="0";
      <%if (list1.size() > 0) {
					for (int i = 0; i < list2.size(); i++) {
						ProductType pc2 = (ProductType) list2.get(i);
						String tCode2 = pc2.getIsBid() + "";%>
              if(val == '<%=tCode2%>')
              {
                counter="1";
                var listbox = document.getElementById("i_ProductTypeProviderCode");
                listbox.length = 0;
                var option1 = new Option();
                option1.text = "--供应商--";
                option1.value = "";
                listbox.options[listbox.length] = option1;
                <%for (int n = 0; n < list3.size(); n++) {
							ProductType pc3 = (ProductType) list3.get(n);
							String tUpperCategory = pc3.getIsBid() + "";
							String pType = pc3.getProductType() + "";
							if (tUpperCategory == null)
								tUpperCategory = "";
							if (tUpperCategory.equals(tCode2)) {
								String categoryId = pc3.getProviderCode();
								String categoryName = pc3.getRemark();%>
                        var ptype='<%=pType%>'
                        if(ptype==val2){
                       			 var temp1 = '<%=categoryId%>';
                      			 var temp2 = '<%=categoryName%>';
                              	 var option1 = new Option();
                       			 option1.value = temp1;
                      			 option1.text = temp2;
                       			 listbox.options[listbox.length] = option1;  
							}                    
                        <%}
						}//end for%>
         
               }//end if
          <%}//end for
				}//end if%>
      
      if(counter == '0')
      {
          var listbox = document.getElementById("i_ProductTypeProviderCode");
          listbox.length = 0;
          var option = new Option();
          option.value = "";
          option.text = "--供应商--";
          listbox.options[listbox.length] = option;  
       }

   }//end else

}

key_InitDefault();
key_RegSubmitHandler(doSearch);


--></script>
<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post"><input
	type=hidden name="action_code" value=""> <input type=hidden
	name="Id" value=""> <input type=hidden name=sortOrder value="">

<!--查询条件保留区域--> <input type=hidden name="s_ConcentricityCode"
	value="<%=event.getConcentricityCode()%>"> <!--集中编码--> <!--  <input type=hidden name="s_ApepCode" value="<%=event.getApepCode()%>">-->
<!--产品编码(18位)--> <input type=hidden name="s_Name"
	value="<%=event.getName()%>"> <!--产品名称--> <input type=hidden
	name="s_Spec" value="<%=event.getSpec()%>"> <!--规格--> <input
	type=hidden name="s_Model" value="<%=event.getModel()%>"> <!--型号-->
<input type=hidden name="s_ProductBrand"
	value="<%=event.getProductBrand()%>"> <!--品牌--> <input
	type=hidden name="s_Manufaturer" value="<%=event.getManufaturer()%>">
<!--生产厂家--> <input type=hidden name="s_ProviderCode"
	value="<%=event.getProviderCode()%>"><!--供应商--> <input
	type=hidden name="s_DrawingPieceCode"
	value="<%=event.getDrawingPieceCode()%>"> <!--图件号--> <input
	type=hidden name="s_KeyWord" value="<%=event.getKeyWord()%>"><!-- 关键字 -->
<input type=hidden name="s_IsNormal" value="<%=event.getIsNormal()%>">
<!--是否正式产品--> <!-- <input type=hidden name="s_IsTradeflatProduct" value="<%=event.getIsTradeflatProduct()%>"> -->
<!--是否交易平台的产品--> <input type=hidden name="s_Status"
	value="<%=event.getStatus()%>"> <!--是否有效--> <input type=hidden
	name="s_IsBuy" value="<%=event.getIsBuy()%>"> <!--是否可采购--> <input type=hidden
	name="s_IsPic" value="<%=event.getIsPic()%>"> <!--有无图片-->  <input
	type=hidden name="s_WarehouseCode"
	value="<%=event.getWarehouseCode()%>"><!--仓库编码--> <input
	type=hidden name="s_CategoryCode" value="<%=event.getCategoryCode()%>"><!--仓库编码-->
<input type=hidden name="s_UpperCategoryCode"
	value="<%=event.getUpperCategoryCode()%>"><!--仓库编码--> <input
	type=hidden name="s_GrandfatherCategoryCode"
	value="<%=event.getGrandfatherCategoryCode()%>"><!--仓库编码--> <input
	type=hidden name="s_ProviderStatus"
	value="<%=event.getProviderStatus()%>"><!--供应商是否有效--> <input
	type=hidden name="s_UpperType" value="<%=event.getUpperType()%>"><!--供应商是否有效-->
<input type=hidden name="s_ProductType"
	value="<%=event.getProductType()%>"><!--供应商是否有效--> <input
	type=hidden name="s_ProductTypeProviderCode"
	value="<%=event.getProductTypeProviderCode()%>"><!--供应商是否有效-->
	<input type=hidden name="s_IsCountProductType" value="<%=event.getIsCountProductType()==null?"":event.getIsCountProductType()%>">
	<input type=hidden name="i_Status" value="">
	<input type=hidden name="i_ProviderStatus" value="">

<%@ include file="/framework/list_head.jsp"%> <br>
<!--********************* Part5:Search Area ***************--> <%=uiSearchStart%>>
<%
 	int key_tab = 1;
 %> <%=uiSearchInputTR%>> <%=uiSearchInputTR%>> <%=uiSearchInputTDHead%>>
 <%=event.getStatus() %>
产品分类：&nbsp;&nbsp; <%=SelectManager.viewGrandFatherSelect(con,
						"i_GrandfatherCategoryCode",
						event.viewGrandfatherCategoryCode(), true, "",
						"--一级--", "", "onchange='selectOnChange1()' key_tab="
								+ (key_tab++))%>
<%=SelectManager.viewUpperSelect(con,
						"i_UpperCategoryCode", event.viewUpperCategoryCode(),
						true, "", "--二级--", "",
						"onchange='selectOnChange2()' key_tab=" + (key_tab++))%>
<%=SelectManager.viewUpperSelect(con, "i_CategoryCode",
						event.viewCategoryCode(), true, "", "--三级--", "",
						"key_tab=" + (key_tab++))%>

</td>
</tr>
<%=uiSearchInputTDHead%>> 产品编码：&nbsp;&nbsp; <input type="text"
	class="texts" name="i_ConcentricityCode" size="20"
	value="<%=event.viewConcentricityCode()%>" key_tab="<%=key_tab++%>">
&nbsp;&nbsp;&nbsp;&nbsp;产品名称：&nbsp;&nbsp;&nbsp;&nbsp; <input type="text"
	class="texts" name="i_Name" size="20" value="<%=event.viewName()%>"
	key_tab="<%=key_tab++%>">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;规&nbsp;&nbsp;&nbsp;&nbsp;格：&nbsp;&nbsp;&nbsp;
<input type="text" class="texts" name="i_Spec" size="20"
	value="<%=event.viewSpec()%>" key_tab="<%=key_tab++%>">
</td>
</tr>
<%=uiSearchInputTR%>> <%=uiSearchInputTDHead%>>
型&nbsp;&nbsp;&nbsp;&nbsp;号：&nbsp;&nbsp; <input type="text" class="texts"
	name="i_Model" size="20" value="<%=event.viewModel()%>"
	key_tab="<%=key_tab++%>">

&nbsp;&nbsp;&nbsp;&nbsp;品&nbsp;&nbsp;&nbsp;&nbsp;牌：&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" class="texts" name="i_ProductBrand" size="20"
	value="<%=event.viewProductBrand()%>" key_tab="<%=key_tab++%>">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;生产厂商：&nbsp;&nbsp;&nbsp;

<input type="text" class="texts" name="i_Manufaturer" size="20"
	value="<%=event.viewManufaturer()%>" key_tab="<%=key_tab++%>">
</td>
</tr>
<%=uiSearchInputTR%>> <%=uiSearchInputTDHead%>>
供&nbsp;应&nbsp;商：&nbsp;&nbsp; <input type="text" class="texts"
	name="i_ProviderCode" size="20" value="<%=event.getProviderCode()%>"
	key_tab="<%=key_tab++%>">
&nbsp;&nbsp;&nbsp;&nbsp;图&nbsp;件&nbsp;号：&nbsp;&nbsp;&nbsp;&nbsp; <input
	type="text" class="texts" name="i_DrawingPieceCode" size="20"
	value="<%=event.viewDrawingPieceCode()%>" key_tab="<%=key_tab++%>">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否可采购：&nbsp;&nbsp;&nbsp; <select
	name="i_IsBuy">
	<option value="">---全部---</option>


	<%
		String tGsIsbuy = (String) request.getParameter("i_IsBuy");
			if (tGsIsbuy == null) {
	%>
	<option value="1" selected>是</option>
	<option value="0">否</option>
	<%
		} else {

				String[][] tIsbuy = GSBaseManager.getAllisbuy();
				if (tIsbuy != null && tIsbuy.length > 0) {

					for (int i = 0; i < tIsbuy.length; i++) {
						String[] temp = tIsbuy[i];
						if (tGsIsbuy != null && tGsIsbuy.equals(temp[0])) {
	%>
	<option value="<%=temp[0]%>" selected><%=temp[1]%></option>
	<%
		} else {
	%>
	<option value="<%=temp[0]%>"><%=temp[1]%></option>
	<%
		}
					}
				}
			}
	%>

</select>
</td>
</tr>


<%=uiSearchInputTR%>> <%=uiSearchInputTDHead%>> 产品划分：&nbsp;&nbsp; <%=SelectManager.viewProductTypeListSelect(con,
						"i_UpperType", event.getUpperType(), true, "",
						"--区域--", "", "onchange='selectChange1()'  key_tab="
								+ (key_tab++))%>
<%=SelectManager.viewBidTypeListSelect(con,
						"i_ProductType", event.getProductType(), true, "",
						"--分类--", "", "onchange='selectChange2()' key_tab="
								+ (key_tab++))%>
<%=SelectManager.viewProviderListSelect(con,
						"i_ProductTypeProviderCode",
						event.getProductTypeProviderCode(), true, "",
						"--供应商--", "", "key_tab=" + (key_tab++))%>
&nbsp;&nbsp;&nbsp;&nbsp;有无图片：&nbsp;&nbsp;&nbsp; <select
	name="i_IsPic">
	<option value="">---全部---</option>
	
	<%
		String tGsIspic = (String) request.getParameter("i_IsPic");
			if (tGsIspic == null) {
	%>
	<option value="1">是</option>
	<option value="0">否</option>
	<%
		} else {
				String[][] tIsPic = GSBaseManager.getAllisbuy();
				if (tIsPic != null && tIsPic.length > 0) {

					for (int i = 0; i < tIsPic.length; i++) {
						String[] temp = tIsPic[i];
						if (tGsIspic != null && tGsIspic.equals(temp[0])) {
	%>
	<option value="<%=temp[0]%>" selected><%=temp[1]%></option>
	<%
		} else {
	%>
	<option value="<%=temp[0]%>"><%=temp[1]%></option>
	<%
		}
					}
				}
			}
	%>
</select>						
</td>
</tr>
<%=uiSearchInputTR%>> <%=uiSearchInputTDHead%>>
按&nbsp;排&nbsp;序：&nbsp;&nbsp; <select name="i_OrderField">
	<option value="" <%=(event.getOrderField().equals("1")) ? "selected" : ""%>>设置排序字段</option>
	<option value="CATEGORY_CODE"
		<%=(event.getOrderField().equals("CATEGORY_CODE"))
						? "selected"
						: ""%>>产品分类编码</option>
	<option value="APEP_CODE"
		<%=(event.getOrderField().equals("APEP_CODE"))
						? "selected"
						: ""%>>产品编码</option>
	<option value="NAME"
		<%=(event.getOrderField().equals("NAME"))
						? "selected"
						: ""%>>产品名称</option>
	<option value="SPEC"
		<%=(event.getOrderField().equals("SPEC"))
						? "selected"
						: ""%>>规格</option>
	<option value="MODEL"
		<%=(event.getOrderField().equals("MODEL"))
						? "selected"
						: ""%>>型号</option>
	<option value="PRODUCT_BRAND"
		<%=(event.getOrderField().equals("PRODUCT_BRAND"))
						? "selected"
						: ""%>>品牌</option>
	<option value="MANUFATURER"
		<%=(event.getOrderField().equals("MANUFATURER"))
						? "selected"
						: ""%>>生产厂家</option>
	<option value="DRAWING_PIECE_CODE"
		<%=(event.getOrderField().equals("DRAWING_PIECE_CODE"))
						? "selected"
						: ""%>>图件号</option>
	<option value="WAREHOUSE_NAME"
		<%=(event.getOrderField().equals("WAREHOUSE_NAME"))
						? "selected"
						: ""%>>所属仓库</option>
	<option value="IS_NORMAL"
		<%=(event.getOrderField().equals("IS_NORMAL"))
						? "selected"
						: ""%>>是否正式产品</option>
	<!-- <option value="IS_TRADEFLAT_PRODUCT" <%=(event.getOrderField().equals("IS_TRADEFLAT_PRODUCT"))
						? "selected"
						: ""%>>数据类型</option> -->
	<!--  <option value="STATUS" <%=(event.getOrderField().equals("STATUS"))
						? "selected"
						: ""%>>是否有效</option> -->
	<option value="IS_BUY"
		<%=(event.getOrderField().equals("IS_BUY"))
						? "selected"
						: ""%>>是否可采购</option>
	<option value="PROVIDER_CODE"
		<%=(event.getOrderField().equals("PROVIDER_CODE"))
						? "selected"
						: ""%>>供应商编码</option>

</select> &nbsp; <input type="radio" name="i_OrderDesc" value="false"
	<%=(event.isOrderDesc() == false) ? "checked" : ""%>>升序 <input
	type="radio" name="i_OrderDesc" value="true"
	<%=(event.isOrderDesc() == true) ? "checked" : ""%>>降序 <input
	type="button" value="查询" class="buttons"
	onclick="doSearch();return false;"><input type="button"
	value="清空" class="buttons" onclick="doClearEvent();return false;">
</td>
</tr>

<%=uiSearchEnd%> <!--列表标题--> <%=UIManager.addListHeadTitle("产品列表")%> <!--********************* Part6:List Area ***************-->

<%=uiListStart%>> <%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1;
%> <%=uiListHeadTR%>> <%=UIManager.addListHeadCheckBox()%>
<%=UIManager.addListHead("产品缩略图", index++)%>
 <%=UIManager.addListHead("产品编码", index++)%>
<%=UIManager.addListHead("产品名称", index++)%> <%=UIManager.addListHead("供应商", index++)%>
<%=UIManager.addListHead("单价", index++)%>
<%=UIManager.addListHead("计量单位", index++)%>
<%=UIManager.addListHead("质保期(天)", index++)%> <%=UIManager.addListHead("质保期(公里)", index++)%>
<%=UIManager.addListHead("规格", index++)%> <%=UIManager.addListHead("型号", index++)%>
<%=UIManager.addListHead("图件号", index++)%> <%=UIManager.addListHead("品牌", index++)%>
<%=UIManager.addListHead("生产厂家", index++)%> <%=UIManager.addListHead("区域", index++)%>
<%=UIManager.addListHead("编码版本号", index++)%> <%=UIManager.addListHead("税收分类编码", index++)%>
<%=UIManager.addListHead("操作", -1)%> <%=uiListHeadTREnd%>> <!--data--> <%
GSProductTaxDao ptdao = new GSProductTaxDao();
	List lss = ptdao.queryProductTax();
	for (int i = 0; i < list.size(); i++) {
 			Product obj = (Product) list.get(i);
 			obj.setAppenderProperty("");
 			obj.setIsBuy("");
 %> <%=uiListDataTR[i % 2]%> align=center> <%=uiListDataTD%>> <input
	type="checkbox" name="ids" value="<%=obj.getId()%>">
</td>
<%=uiListDataTD%>>
<img src="/gw/servlet/ProductPictureShowServlet?productCode=<%=obj.viewConcentricityCode(con) %>" height="40" width="40"/>
</td>
<%=uiListDataTD%>><%=obj.viewConcentricityCode(con)%></td>
<%=uiListDataTD%>><%=obj.viewName(con)%></td>
<%=uiListDataTD%>><%=obj.viewProviderCode(con)%></td>
<%=uiListDataTD%>><%=obj.viewUnitPrice(con)%></td>
 <%=uiListDataTD%>><%=obj.viewProductUnit(con)%></td>
<%=uiListDataTD%>><%=obj.viewQualityAssurePeriod(con)%></td>
<%=uiListDataTD%>><%=obj.viewKmQualityAssurePeriod(con)%></td>
<%=uiListDataTD%>><%=obj.viewSpec(con)%></td>
<%=uiListDataTD%>><%=obj.viewModel(con)%></td>
<%=uiListDataTD%>><%=obj.viewDrawingPieceCode(con)%></td>
<%=uiListDataTD%>><%=obj.viewProductBrand(con)%></td>
<%=uiListDataTD%>><%=obj.viewManufaturer(con)%></td>
<%
	ProductType cmd = ProductType.fetchByProductId(con,
					obj.getId());
%> <%=uiListDataTD%>><%=cmd == null ? "" : com.hitrust.gs.util.DefineDic
							.getProductType(cmd.getProductType() + "")%></td>
<% boolean is = false;
if(lss!=null&&lss.size()>0){
for(int j = 0; j < lss.size(); j++){
	ProductTaxData obj2 = (ProductTaxData) lss.get(j);
	if(obj.viewConcentricityCode(con).equals(obj2.getProductCode())){
		obj.setAppenderProperty(obj2.getCodeEdition());
		obj.setIsBuy(obj2.getTaxType());
		is=true;
		%>
<%=uiListDataTD%>><%=obj2.getCodeEdition()%></td>
<%=uiListDataTD%>><%=obj2.getTaxType()%></td>	
<%
break;}
	if(j==lss.size()-1&&is==false){
		%>
		<%=uiListDataTD%>></td>
		<%=uiListDataTD%>></td>
		<%
	
}
}
	}else{
		%><%=uiListDataTD%>></td>
<%=uiListDataTD%>></td>	<%
	}
%>

<%=uiListDataTD%>> <a href=""
	onclick="bizViewProduct('<%=obj.getId()%>');return false;">浏览</a>
</td>
</tr>
<%
	}
%> <%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%> <!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>> <%=uiCommandTR%>> <%=uiCommandTD%>> <!--  <input type=button value="　添加临时产品　" class="buttons" onclick="doToAdd();return false;">
        <input type=button value="　修改临时产品　" class="buttons" onclick="doToUpdate();return false;"> -->
<!--  <input type=button value="    合并产品   " class="buttons" onclick="doDelete();return false;">-->
<input type=button value="　　修改产品税务信息　　" class="buttons" onclick="doToUpdate();return false;">
<input type=button value="　　批量导入税务信息　　" class="buttons"
	onclick="addInfos();">
</td>
</tr>
<%=uiCommandEnd%></form>
<script language=javascript>
    selectOnChange1();
    SetValue("i_UpperCategoryCode","<%=event.getUpperCategoryCode()%>"); //产品分类编码
    selectOnChange2();
    SetValue("i_CategoryCode","<%=event.viewCategoryCode()%>"); //产品分类编码
    
    selectChange1();
    SetValue("i_ProductType","<%=event.getProductType()%>"); 
    selectChange2();
    SetValue("i_ProductTypeProviderCode","<%=event.getProductTypeProviderCode()%>"); 
</script>
<%@ include file="/framework/foot.jsp"%>

<!--
    Author    :chengbiao.he
    FileName  :/system/base/ProductList.jsp
-->
